package zsl.utils;

import java.util.ArrayList;

public class TAInfo {
	private int accessDepth;
	private int maxDepth;
	
	private ArrayList<TAStepInfo> stepInfos;
	
	public class TAStepInfo{
		private int depth;
		private int threshold;
		private int leastK;
		
		public TAStepInfo(int depth, int threshold, int leastK) {
			super();
			this.depth = depth;
			this.threshold = threshold;
			this.leastK = leastK;
		}

		public int getDepth() {
			return depth;
		}

		public int getThreshold() {
			return threshold;
		}

		public int getLeastK() {
			return leastK;
		}
	}
	
	public TAInfo() {
		accessDepth = -1;
		maxDepth = -1;
		stepInfos = new ArrayList<>();
	}
	
	public void addStepInfos(int curDepth, int threshold, int leastK){
		stepInfos.add(new TAStepInfo(curDepth, threshold, leastK));
	}

	public int getAccessDepth() {
		return accessDepth;
	}

	public void setAccessDepth(int accessDepth) {
		this.accessDepth = accessDepth;
	}

	public int getMaxDepth() {
		return maxDepth;
	}

	public void setMaxDepth(int maxDepth) {
		this.maxDepth = maxDepth;
	}
	
	public void clear() {
		accessDepth = -1;
		maxDepth = -1;
		stepInfos.clear();
	}
	
	public TAStepInfo getStepInfo(int index){
		return stepInfos.get(index);
	}
	
	public int getStepInfoSize(){
		return stepInfos.size();
	}

}
